<?php
/*
 *      admin.php
 *      
 *      Copyright 2011 unro <unro.ua@gmail.com>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
include ("./inc/core.php");
ADMINSESSION();
$uid = $_SESSION["userID"];
OpenConn();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=http://www.w3.org/1999/xhtml xml:lang=en lang=en>
<head>
	<title>Управление Панелью</title>
	<meta http-equiv=content-type content=text/html;charset=utf8 /></head>
	<link href=css/style.css rel=stylesheet type=text/css />
<body>
<input type=submit value=Выход onclick="location.href='dologin.php?action=logout'">
<input type=submit value="Панель голосования" onclick="location.href='index.php'">
<br>
<center><b>Журнал</b></center>
<table width=auto border=1 align=center>
<tr><td>ID аккаунта</td><td>ИП</td><td>Событие</td><td>Дата</td></tr>
<?php
	$select_log = mysql_query("SELECT * FROM `vote_log` ORDER BY `eventtime` DESC LIMIT 0 , 10");
	while($rov=mysql_fetch_array($select_log))
	{echo "<tr><td>".$rov['uid']."</td><td>".$rov['ip']."</td><td>".$rov['message']."</td><td>".$rov['eventtime']."</td></tr>";}
?></table><br><br>
<center><b>Добавление ТОПов</b></center>
<form method=post action=mod/top.php?do=add>
<table width=auto border=1 align=center>
<tr align=center><td>Название</td><td>Ссылка</td><td>Количество бонусов</td></tr>
<tr align=center>
<td><input name=name type=text size=20 maxlength=50></td>
<td><input name=link type=text size=20 maxlength=50></td>
<td><input name=cost type=text size=5 maxlength=50></td></tr>
<tr><td colspan=3 align=center><input type=submit value=Добавить></td></tr></table></form><br> 
<center><b>Удаление ТОПов</b></center>
<form method=post action=mod/top.php?do=del>
<table width=auto border=1 align=center>
<tr><td colspan=2>Название ТОПа</td></tr>
<tr><td><input name=name type=text size=20 maxlength=50></td><td><input type=submit value=Удалить></td></tr></table></form><br>
<form method=post action=mod/voteaccept.php>
<table width=auto border=1 align=center>
<tr><td>ID-аккаунта</td>
<td><input id=uid name=uid type=text size=5 maxlength=5></td>
<td>Действие:</td>
<td>
	<select name=do id=do size=1>
	<option value=1>Блокировать голосование</option>
	<option value=0>Разблокировать голосование</option></td>
<td><input type=submit value=Выполнить></td></tr></table></body></html>
